package homework.search;

import java.util.Scanner;

public class Search {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String word = "你这是什么意思？没什么意思，就是意思意思，小意思";

        System.out.println("请输入你要找的字符");
        String str = sc.nextLine();
        int count = 0;
        while (word.indexOf(str) != -1){
            int a = word.indexOf(str);
            int b = str.length();
            word = word.substring(a+b);
            count++;

        }
        System.out.println(count);
    }



}
